package cn.edu.scau.cmi.zeyang.composite.consistent;

import java.util.LinkedList;
import java.util.List;

public class ConsistentOrganization extends ConsistentMember{

	private List<ConsistentMember> list;

	public ConsistentOrganization(String name,ConsistentMember parent) {
		super(name,parent);
		list = new LinkedList<>();
	}


	@Override
	public ConsistentMember getParent() {
		return parent;
	}

	@Override
	public void addChild(ConsistentMember child) {
		list.add(child);
	}

	@Override
	public void deleteAll() {
		list.clear();;
	}

	@Override
	public List<ConsistentMember> getChildren() {
		return list;
	}



}
